Add private api to load a single module
authorMatthias Clasen <mclasen@redhat.com>
Wed, 7 May 2014 02:19:12 +0000 (22:19 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 11 May 2014 02:04:19 +0000 (22:04 -0400)
In the following commits, this function will be used to load the
gtkparasite module.

gtk/gtkmodules.c
gtk/gtkmodules.h
gtk/gtkmodulesprivate.h

index 640be7bb55addf5953f5b42eed50146de9fec6b5..87883e9c7084f054b4fa292bf0592fd29626fc37 100644 (file)
@@ -600,3 +600,10 @@ _gtk_module_has_mixed_deps (GModule *module_to_check)
 
   return result;
 }
+
+void
+_gtk_modules_load_module (const gchar *name)
+{
+  /* We leak the ref */
+  g_slist_free (load_modules (name));
+}
index 29409b7041a690f6f16d083864cb2d36d47d2234..b5a756edfe4af148e627c93b430d9c32bd6023c3 100644 (file)
@@ -49,7 +49,6 @@ typedef void     (*GtkModuleInitFunc)        (gint        *argc,
  */
 typedef void     (*GtkModuleDisplayInitFunc) (GdkDisplay   *display);
 
-
 G_END_DECLS
 
 
index 11dbebfd9dd2963f0a486004a0837973461a6884..34c30739f909ad3c86e1629149c88d219ec75c8b 100644 (file)
@@ -38,6 +38,7 @@ void     _gtk_modules_init             (gint          *argc,
                                         const gchar   *gtk_modules_args);
 void     _gtk_modules_settings_changed (GtkSettings   *settings,
                                         const gchar   *modules);
+void     _gtk_modules_load_module      (const gchar   *name);
 
 gboolean _gtk_module_has_mixed_deps    (GModule       *module);